package com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.order;


import com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.pizza.BJCheesePizza;
import com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.pizza.BJPepperPizza;
import com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.pizza.Pizza;

/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.order
 * @Author: Del
 * @CreateTime: 2025-06-03  00:32
 * @Description: 工厂方法 ---  订购披萨的具体子类
 * @Version: 1.0
 */
public class BJOrderPizza extends  OrderPizza{
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ( orderType.equals("cheese")) {
             pizza = new BJCheesePizza();
        } else if (orderType.equals("pepper")) {
             pizza = new BJPepperPizza();
        }
        return pizza;
    }
}
